package com.guldan.core.constants;

/**
 * Created by Silas.
 * Date: 2016/10/1
 * Time: 22:16
 */
public class CommonConstant {
    public static final String SUCCESS = "SUCCESS";
    public static final String FAIL = "FAIL";

    public static final String KEY_LOGINUSER = "LOGIN_USER_KEY";

    //summary phase
    public static final int SUMMARY_PHASE_CREATE = 1;
    public static final int SUMMARY_PHASE_DOWNLOAD = 2;
    public static final int SUMMARY_PHASE_BANKUPLOAD = 3;

    public CommonConstant() {
    }

    public static final class YesOrNo {
        public static final int YES = 1;
        public static final int NO = 0;

        public YesOrNo() {
        }
    }

    //citizen information dictionary type id
    public static final int DIC_TYPE_IDENT = 13;   //证件类型
    public static final int DIC_TYPE_RELATION = 8;  //与户主关系
    public static final int DIC_TYPE_CITIZEN_INFOCODE = 38;  //人员信息分类
    public static final int DIC_TYPE_CITIZEN_TYPECODE = 29;  //人员分类
    public static final int DIC_TYPE_TYPECODE_HOUSEHOLD = 19; //户口类型
    public static final int DIC_TYPE_BANKCODE = 31;  //所属银行
    public static final int DIC_TYPE_NATION = 5;   //民族类型
    public static final int DIC_TYPE_DEGREE = 6;  //学历类型
    public static final int DIC_TYPE_PAYCYCLE = 9;  //发放周期


    //citizen dictionary code
    public static final String DIC_CODE_ISMASTER = "555";


    public static final String KEY_AREA = "key_areaId_%s";   // areaid List<Integer> 所有子的id列表
    public static final String KEY_AREA_DATA = "key_area_data_%s";   // areaid Area
    public static final String KEY_ORG = "key_org_%s";
    public static final String KEY_ORG_CODE = "key_org_code_%s";
    public static final String KEY_DIC = "key_dic_%s_%s";   //dictypeid_diccode  dictionaryDTO
    public static final String KEY_DIC_TYPE = "key_dic_type_%s";   //type id   dictionaryDTOList


    public static final String KEY_BAR_UPLOAD_REGISTER_ID = "key_bar_upload_register_id_%s";
    public static final String KEY_BAR_UPLOAD_CITIZEN_ID = "key_bar_upload_citizen_id_%s";
    public static final String KEY_BAR_UPLOAD_CITIZEN_UPDATE_ID = "key_bar_upload_citizen_update_id_%s";
    public static final String KEY_BAR_UPLOAD_BANK_RETURN_ID = "key_bar_upload_bank_return_id_%s";

    public static final String KEY_FINANCE_CREATE_DATA = "key_finance_create_data_%s";
    public static final String KEY_CITIZEN_FAIL_DATA = "key_citizen_fail_data_%s";
    public static final String KEY_CITIZEN_DOWN_DATA = "key_citizen_down_data_%s";

    public static final String KEY_DATAV_AREA_DATA = "key_datav_areaid_%s";


    public static final Integer TIME_SECOND_ONEWEEK = 3600 * 24 * 7;   //7天

    public static final Integer TIME_SECOND_ONEDAY = 60 * 60 * 24;   //1天


    //Thread Number
    public static final int THREAD_NUMBER_UPLOAD_CITIZEN = 60;   //批量导入人员线程数
    public static final int THREAD_NUMBER_UPLOAD_REGISTER = 60;  //登记上传线程数
    public static final int THREAD_NUMBER_UPDATE_CITIZEN = 50;   //批量更新人员信息线程数
    public static final int THREAD_NUMBER_UPLOAD_BANK_RETURN = 60;  //银行上传回执线程数

    public static final int THREAD_NUMBER_DOWN_CITIZEN = 50;   //下载人员线程数

    public static final int THREAD_MAX_RECORD_COUNT = 400;  //开启多线程处理最小任务数


    //角色code
    public static final String ROLE_Admin = "00";  //管理员
    public static final String ROLE_TownsEntry = "01";  //乡镇录入
    public static final String ROLE_TownsReview = "02";  //乡镇复核
    public static final String ROLE_Org = "03";  //主管部门
    public static final String ROLE_Finance = "04";  //财政


    //Thread lock
    //人员导入
    public static final String LOCK_KEY_UPLOAD_CITIZEN_IdentNumber = "LOCK_KEY_UPLOAD_CITIZEN_IdentNumber_%s";   //锁id
    public static final String LOCK_KEY_UPLOAD_CITIZEN_HouseholdRegisterNumber = "LOCK_KEY_UPLOAD_CITIZEN_HouseholdRegisterNumber_%s";   //锁id
    //登记上传
    public static final String LOCK_KEY_UPLOAD_REGISTER_IdentNumber = "LOCK_KEY_UPLOAD_REGISTER_IdentNumber_%s";   //锁id

    public static final int CITIZEN_FAILREASON_ONELINE_CHARS_LENGTH = 100; //execl中的占位符=30个汉字
    public static final int REGISTER_FAILREASON_ONELINE_CHARS_LENGTH = 100; //execl中的占位符=30个汉字

}
